<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
<HTML
><HEAD
><TITLE
>DPGEN_RF1</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.7"><LINK
REL="HOME"
TITLE=" GenLib User's Manual "
HREF="genlib.html"><LINK
REL="UP"
TITLE="Alliance - genlib User's Manual "
HREF="ref_genlib.html"><LINK
REL="PREVIOUS"
TITLE="DPGEN_ROM4"
HREF="man_dpgen_rom4.html"><LINK
REL="NEXT"
TITLE="DPGEN_FIFO"
HREF="man_dpgen_fifo.html"></HEAD
><BODY
CLASS="REFENTRY"
BGCOLOR="#FFFFFF"
TEXT="#000000"
LINK="#0000FF"
VLINK="#840084"
ALINK="#0000FF"
><DIV
CLASS="NAVHEADER"
><TABLE
SUMMARY="Header navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TH
COLSPAN="3"
ALIGN="center"
>GenLib User's Manual</TH
></TR
><TR
><TD
WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="man_dpgen_rom4.html"
ACCESSKEY="P"
>&#60;&#60;&#60; Previous</A
></TD
><TD
WIDTH="80%"
ALIGN="center"
VALIGN="bottom"
></TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="man_dpgen_fifo.html"
ACCESSKEY="N"
>Next &#62;&#62;&#62;</A
></TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><H1
><A
NAME="DPGEN-RF1"
></A
>DPGEN_RF1</H1
><DIV
CLASS="REFNAMEDIV"
><A
NAME="AEN2866"
></A
><H2
>Name</H2
> DPGEN_RF1 ,  DPGEN_RF1R0 &nbsp;--&nbsp; Register File Macro-Generator </DIV
><DIV
CLASS="REFSYNOPSISDIV"
><A
NAME="AEN2870"
></A
><H2
>Synopsis</H2
><DIV
CLASS="FUNCSYNOPSIS"
><P
></P
><A
NAME="AEN2871"
></A
><TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><PRE
CLASS="FUNCSYNOPSISINFO"
>#include  &#60;genlib.h&#62;</PRE
></TD
></TR
></TABLE
><P
><CODE
><CODE
CLASS="FUNCDEF"
>void <TT
CLASS="FUNCTION"
>GENLIB_MACRO</TT
></CODE
>(DPGEN_RF1, char *<TT
CLASS="PARAMETER"
><I
>modelname</I
></TT
>, long <TT
CLASS="PARAMETER"
><I
>flags</I
></TT
>, long <TT
CLASS="PARAMETER"
><I
>N</I
></TT
>);</CODE
></P
><P
><CODE
><CODE
CLASS="FUNCDEF"
>void <TT
CLASS="FUNCTION"
>GENLIB_MACRO</TT
></CODE
>(DPGEN_RF1R0, char *<TT
CLASS="PARAMETER"
><I
>modelname</I
></TT
>, long <TT
CLASS="PARAMETER"
><I
>flags</I
></TT
>, long <TT
CLASS="PARAMETER"
><I
>N</I
></TT
>);</CODE
></P
><P
></P
></DIV
></DIV
><DIV
CLASS="REFSECT1"
><A
NAME="AEN2893"
></A
><H2
> Description </H2
><P
> Generate a register file of <VAR
CLASS="REPLACEABLE"
>regNumber</VAR
> words of <VAR
CLASS="REPLACEABLE"
>N</VAR
> bits
    whitout decoder named <VAR
CLASS="REPLACEABLE"
>modelname</VAR
>. The <TT
CLASS="LITERAL"
>DPGEN_RF1R0</TT
> variant differs
    from the <TT
CLASS="LITERAL"
>DPGEN_RF1</TT
> in that the register of address zero is stuck to
    zero. You can write into it, it will not change the value. When read,
    it will always return zero.
    </P
><P
> How it works :
    <P
></P
><UL
><LI
><P
> <TT
CLASS="LITERAL"
>datain0</TT
> and <TT
CLASS="LITERAL"
>datain1</TT
> : the two write busses. Only one
        is used to actually write the register word, it is selected by
        the <TT
CLASS="LITERAL"
>sel</TT
> signal.
        </P
></LI
><LI
><P
> <TT
CLASS="LITERAL"
>sel</TT
> : when set to <TT
CLASS="LITERAL"
>'0'</TT
> the <TT
CLASS="LITERAL"
>datain0</TT
> is used to write
        the register word, otherwise it will be <TT
CLASS="LITERAL"
>datain1</TT
>.
        </P
></LI
><LI
><P
> <TT
CLASS="LITERAL"
>selr</TT
>, <TT
CLASS="LITERAL"
>selw</TT
> : this register file have no decoder, so
        <TT
CLASS="LITERAL"
>selr</TT
> have a bus width equal to <VAR
CLASS="REPLACEABLE"
>regNumber</VAR
>. One bit for each word.
        </P
></LI
></UL
>
    </P
><DIV
CLASS="REFSECT2"
><A
NAME="AEN2920"
></A
><H3
> Terminal Names </H3
><P
></P
><OL
TYPE="1"
><LI
><P
> <TT
CLASS="LITERAL"
>ckok</TT
> : clock signal (input, 1 bit). </P
></LI
><LI
><P
> <TT
CLASS="LITERAL"
>sel</TT
> : select the write bus (input, 1 bit). </P
></LI
><LI
><P
> <TT
CLASS="LITERAL"
>selr</TT
> : the decoded read address (input, <VAR
CLASS="REPLACEABLE"
>regNumber</VAR
> bits). </P
></LI
><LI
><P
> <TT
CLASS="LITERAL"
>selw</TT
> : the decoded write address (input, <VAR
CLASS="REPLACEABLE"
>regNumber</VAR
> bits). </P
></LI
><LI
><P
> <TT
CLASS="LITERAL"
>datain0</TT
> :  first write bus (input, <VAR
CLASS="REPLACEABLE"
>N</VAR
> bits). </P
></LI
><LI
><P
> <TT
CLASS="LITERAL"
>datain1</TT
> :  second write bus (input, <VAR
CLASS="REPLACEABLE"
>N</VAR
> bits). </P
></LI
><LI
><P
> <TT
CLASS="LITERAL"
>dataout</TT
> : read bus (output, <VAR
CLASS="REPLACEABLE"
>N</VAR
> bits). </P
></LI
><LI
><P
> <TT
CLASS="LITERAL"
>vdd</TT
> : power. </P
></LI
><LI
><P
> <TT
CLASS="LITERAL"
>vss</TT
> : ground. </P
></LI
></OL
></DIV
></DIV
><DIV
CLASS="REFSECT1"
><A
NAME="AEN2955"
></A
><H2
> Example </H2
><P
>    <TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><PRE
CLASS="PROGRAMLISTING"
>GENLIB_MACRO(DPGEN_RF1, "model_rf1x8_32"
                      , F_BEHAV|F_PLACE
                      , 32  /* Words size.      */
                      , 8   /* Number of words. */
                      );

GENLIB_LOINS( "model_rf1x8_32"
            , "instance1_rf1_32"
            , "ckok"
            , "sel"
            , "selr[7:0]"
            , "selw[7:0]"
            , "datain0[31:0]"
            , "datain1[31:0]"
            , "dataout[31:0]"
            , "vdd", "vss", NULL
            );
    </PRE
></TD
></TR
></TABLE
>
    </P
></DIV
><DIV
CLASS="REFSECT1"
><A
NAME="AEN2959"
></A
><H2
>See Also</H2
><P
>      <A
HREF="man_genlib_macro.html"
><SPAN
CLASS="CITEREFENTRY"
><SPAN
CLASS="REFENTRYTITLE"
>GENLIB_MACRO</SPAN
>(3)</SPAN
></A
>,
      <A
HREF="man_genlib.html"
><SPAN
CLASS="CITEREFENTRY"
><SPAN
CLASS="REFENTRYTITLE"
>genlib</SPAN
>(1)</SPAN
></A
>
    </P
></DIV
><DIV
CLASS="NAVFOOTER"
><HR
ALIGN="LEFT"
WIDTH="100%"><TABLE
SUMMARY="Footer navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="man_dpgen_rom4.html"
ACCESSKEY="P"
>&#60;&#60;&#60; Previous</A
></TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="genlib.html"
ACCESSKEY="H"
>Home</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="man_dpgen_fifo.html"
ACCESSKEY="N"
>Next &#62;&#62;&#62;</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>DPGEN_ROM4</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="ref_genlib.html"
ACCESSKEY="U"
>Up</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>DPGEN_FIFO</TD
></TR
></TABLE
></DIV
></BODY
></HTML
>